<script lang="ts" setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter();

import homeModelOneUtil from "./homeModelOneUtil.vue";
import homeModelTwoUtil from "./homeModelTwoUtil.vue";

const props = defineProps({
  perfectProduct: {
      type: Array
    }
});

</script>

<template>
  <section class="homeProductModelOneUtil">
    <div class="title"></div>
    <div class="content">
      <div class="content-top">
        <div class="br" v-if="props.perfectProduct">
          <homeModelOneUtil :product="props.perfectProduct[0]"></homeModelOneUtil>
        </div>
        <div v-if="perfectProduct">
          <homeModelOneUtil :product="props.perfectProduct[1]"></homeModelOneUtil>
        </div>
      </div>
      <div class="content-bottom" v-if="props.perfectProduct">
        <homeModelTwoUtil :product="props.perfectProduct[2]"></homeModelTwoUtil>
        <homeModelTwoUtil :product="props.perfectProduct[3]"></homeModelTwoUtil>
        <homeModelTwoUtil :product="props.perfectProduct[4]"></homeModelTwoUtil>
        <homeModelTwoUtil :product="props.perfectProduct[5]" :borderR="false"></homeModelTwoUtil>
      </div>
      
    </div>
  </section>
</template>

<style lang="less" scoped>
.homeProductModelOneUtil {
  width: 3.75rem;
  background: white;
  .title {
    height: .35rem;
    background: url("../../../assets/images/model-icon-4.jpg") no-repeat center;
    background-size: contain;
    background-color: #f6f6f6;
  }
  .content {
    .content-top {
      display: flex;
      justify-content: center;
      position: relative;
      &:after {
        width: 100%;
        content: "";
        height: .0rem;
        border-top: .01rem solid transparent;
        position: absolute;
        background: #f5f5f5;
        bottom: 0;
        right: 0;
        // -webkit-transform: scaleX(.5);
        // transform: scaleX(.5);
        z-index: 10;
      }
      .br {
        position: relative;
        &:after {
          height: 100%;
          content: "";
          width: .01rem;
          border-right: .01rem solid transparent;
          position: absolute;
          background: #f5f5f5;
          top: 0;
          right: 0;
          -webkit-transform: scaleX(.5);
          transform: scaleX(.5);
          z-index: 10;
        }
      }
      
    } 
    .content-bottom {
      display: flex;
      justify-content: center;
    }
  }
  
}
</style>

